<template>
	<div>
		<!-- 播放器 -->
		<div class="video-c">
		  <div id="MPSplayer"></div>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		methods: {
				video:function(){
					// 阿里云
					var player = new Aliplayer({
						id: 'MPSplayer',
						width: '100%',
						height:'100%',
						autoplay: true,
						//支持播放地址播放,此播放优先级最高
						source: 'https://p3i51wh5p.bkt.clouddn.com/20181128%20%E3%80%90%E7%9C%9F%E4%BA%BA%E6%89%8B%E6%9C%AF%E3%80%91%E4%B8%8A%E4%B8%8B%E9%A2%8C%E6%99%BA%E9%BD%BF%E5%BE%AE%E5%88%9B%E6%8B%94%E9%99%A4%E6%9C%AF+%E8%AE%B2%E8%A7%A3.mp4',
						// source: 'http://qikeya.com/xiaoqi/xioaqi.m3u8',
						// isLive:true,  //播放内容是否为直播，直播时会禁止用户拖动进度条。
						// skinLayout:false,//功能组件布局配置，不传该字段使用默认布局  传false隐藏所有功能组件，请参照皮肤定制。
						videoWidth: "98%",
					},function(player){
						console.log('播放器创建好了。');
						 player.on('ready',function(e) {
							player.play();
							console.log(player.getDuration());
							console.log(player.getCurrentTime());
						 });
				   });
				},
	    },
		mounted(){
			var that = this;
			that.video();
		},
	}
</script>

<style scoped="scoped">
.video-c{
	width: 100% !important;
	height: 220px !important;
}
</style>
